list = [1, 2, 3, 4, 5]

print(list)

list.append(6)

print(list)

list.insert(0, 0)

list.insert(20, 10)

for i in list:
    print(i, end=" ")

print()

del list[2]
list.pop(2)
list.remove(4)

print(list)

print(list.count(10))  # 统计此元素在列表中出现的次数
print(len(list))  # 统计容器内有多少元素

new_list = list[::2]  # 隔一个取一个

print(new_list)

for i, v in enumerate(['tic', 'tac', 'toe']):
    print(i, v)
